<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>

<!-- Helena -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="head.htm"/>
</head>
<body>
	<div id="head"><h1>HotelOrganizer</h1></div>
	<jsp:include page="menu-hotel.htm"/>
	<div id="content">
		<h2><c:out value="${title}"/></h2>
		<p><c:out value="${message}"/></p>
		<table class="listing">
			<colgroup>
				<c:if test="${edit}">
					<col class="buttoncell"/>
					<col class="buttoncell"/>
				</c:if>
				<col/>
				<col/>
				<col/>
				<col/>
			</colgroup>
			<tbody>
				<tr>
					<c:if test="${edit}">
						<th></th>
						<th></th>
					</c:if>
					<th>Zimmer-Nr.</th>
					<th>Anzahl der Betten</th>
					<th>QM</th>
					<th>Haustiere</th>
					<th>Raucherzimmer</th>
					<th>Kategorie</th>
				</tr>
				<c:forEach items="${zimmer1}" var="zimmer">
					<tr>
						<c:if test="${edit}">
							<td>
								<a href="EditZimmer.html?id=<c:out value="${zimmer.id}"/>">
									<img src="images/button_edit.png" alt="Icon - Bearbeite Zimmer"/>
								</a>
							</td>
							<td>
								<a href="LoescheZimmer.html?id=<c:out value="${zimmer.id}"/>">
									<img src="images/button_drop.png" alt="Icon - Lösche Zimmer"/>
								</a>
							</td>
						</c:if>
						<td><c:out value="${zimmer.nr}"/></td>
						<td><c:out value="${zimmer.betten}"/></td>
						<td><c:out value="${zimmer.qm}"/></td>
						
					    <td>
						<c:choose>
						<c:when test="${zimmer.haustier == true}">
						<c:out value="ja"/>
						</c:when>
						<c:otherwise>
						<c:out value="nein"/>
						</c:otherwise>
						</c:choose>
						</td>
						<td>   
						<c:choose>
						<c:when test="${zimmer.raucher == true}">
						<c:out value="ja"/>
						</c:when>
						<c:otherwise>
						<c:out value="nein"/>
						</c:otherwise>
						</c:choose>
						</td>
						<td><c:out value="${zimmer.kategorie.bezeichnung}"/></td>
					</tr>
				</c:forEach>  
			</tbody>
		</table>
		<br />
		<p>
			<a href="EditZimmer.html">Zimmer hinzufügen</a>
		</p>
	</div>
</body>
</html>